package _07转换流InputStreamReader;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;

public class DemoInputStreamReader {
    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(new FileInputStream("D:\\黑马java培训班\\资料\\内网通下载文件\\教师端\\china_gbk.txt"),"`gbk`");
        char[] chars = new char[1024];

        int read;
        while ((read = isr.read(chars))!=-1){
            System.out.println(new String(chars,0,read));
        }


    }
}
